home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 March / CMCD0305.ISO / Software / Demo / Maguma / workbench-2.1.0-trial.exe / {app} / resource / common / defaults / snippets.xml < prev   
Extensible Markup Language  |  2004-07-08  |  6KB  |  225 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <snippets>
  3.   <section name="html4" description="HTML 4.0">
  4.     <token name="basic template"><html>
  5.     <head>
  6.         <title></title>
  7.     </head>
  8.     <body>
  9.     </body>
  10. </html></token>
  11.     <token name="form_post"><form action="|" method="POST">
  12. </form></token>
  13.     <token name="form_get"><form action="|" method="GET">
  14. </form></token>
  15.   </section>
  16.   <section name="php4" description="PHP 4.x">
  17.     <token name="phpdef"><?php
  18.             
  19.             ?>
  20.         </token>
  21.     <token name="mysql_connect_and_query">            $lnk = mysql_connect("host","user","password);
  22.             if ($lnk)
  23.                 $dbc = mysql_select_db("dbname");
  24.             if ($dbc) {
  25.                 $query = "SELECT * FROM table";
  26.                 $result = mysql_query($query);
  27.                 if (!$result) echo "ERROR: ".mysql_error()."<br />".$query;
  28.             }
  29.         </token>
  30.   </section>
  31.   <section name="blah" description="blah">
  32.     <token name="blah">blah</token>
  33.     <token name="knowing">I know | at the end of the day</token>
  34.   </section>
  35.   <section name="template" description="Templates">
  36.     <token name="PHP File"><!doctype html public "-//W3C//DTD HTML 4.0 //EN">
  37. <html>
  38. <head>
  39.        <title>Title here!</title>
  40. </head>
  41. <body>
  42. <?php
  43.  
  44. ?>
  45. </body>
  46. </html></token>
  47.     <token name="PHP Unit Class"><?php
  48.  
  49. // PEAR::phpUnit class
  50. // NOTE: you must replace the {classname} text, and modifiy the {something} text.
  51.  
  52. require_once "PEAR.php";
  53. require_once "PHPUnit.php";
  54.  
  55. require_once "{classname}";
  56.  
  57. /**
  58. * PHP Unit test class
  59. *
  60. * Class for unit testing.
  61. *
  62. */
  63. class {classname}Test extends PHPUnit_TestCase {
  64.  
  65.     /**
  66.     * constructor for the Unit Test.
  67.     *
  68.     */
  69.     function {classname}Test  ($name = "{classname}Test") {
  70.         $this->PHPUnit_TestCase($name);
  71.     }
  72.  
  73.     /**
  74.     * initialization of the test environment
  75.     *
  76.     */
  77.         function setUp() {
  78.     }
  79.  
  80.     /**
  81.     * de-initialization of the test environment
  82.     *
  83.     */
  84.         function tearDown() {
  85.     }
  86.  
  87.     /**
  88.     * one test
  89.     *
  90.     */
  91.     function test_{something}() {
  92.  
  93.         // try something
  94.  
  95.         // test
  96.         $this->assertTrue(true, "error message if false");
  97.     }
  98.  
  99. }
  100.  
  101. ?>
  102.  
  103. </token>
  104.     <token name="XHTML Basic"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
  105.     "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
  106. <html>
  107. <!--
  108.    XHTML Basic - for use with Small Information Appliances
  109.    Document type as defined on http://www.w3.org/TR/1998/REC-html40-19980424/
  110. -->
  111. <head>
  112.     <title>Title here!</title>
  113.     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  114. </head>
  115.     <frameset>
  116.     
  117.     </frameset>
  118. </html>
  119. </token>
  120.     <token name="XHTML Frameset"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
  121.      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
  122. <html>
  123. <!--
  124.    XHTML 1.0 Frameset
  125.    Document type as defined on http://www.w3.org/TR/xhtml1/
  126. -->
  127. <head>
  128.     <title>Title here!</title>
  129.     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  130. </head>
  131. <frameset>
  132.  
  133. </frameset>
  134. </html>
  135. </token>
  136.     <token name="XHTML Strict"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  137.      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  138. <html>
  139. <!--
  140.    XHTML 1.0 Strict
  141.    Document type as defined on http://www.w3.org/TR/xhtml1/
  142. -->
  143. <head>
  144.     <title>Title here!</title>
  145.     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  146. </head>
  147. <body>
  148.  
  149. </body>
  150. </html>
  151. </token>
  152.     <token name="XHTML Transitional"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  153.      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  154. <html>
  155. <!--
  156.    XHTML 1.0 Transitional
  157.    Document type as defined on http://www.w3.org/TR/xhtml1/
  158. -->
  159. <head>
  160.     <title>Title here!</title>
  161.     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  162. </head>
  163. <body>
  164.  
  165. </body>
  166. </html></token>
  167.     <token name="HTML 4.01 Transitional"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  168.         "http://www.w3.org/TR/html4/loose.dtd">
  169. <html>
  170. <!--
  171.    HTML 4.01 Transitional
  172.    Document type as defined on http://www.w3.org/TR/html401/
  173. -->
  174. <head>
  175.     <title>Title here!</title>
  176.     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  177. </head>
  178. <body>
  179.     
  180. </body>
  181. </html>
  182. </token>
  183.     <token name="HTML 4.01 Strict"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  184.         "http://www.w3.org/TR/html4/strict.dtd">
  185. <html>
  186. <!--
  187.    HTML 4.01 Strict
  188.    Document type as defined on http://www.w3.org/TR/html401/
  189. -->
  190. <head>
  191.     <title>Title here!</title>
  192.     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  193. </head>
  194. <body>
  195.  
  196. </body>
  197. </html>
  198. </token>
  199.     <token name="HTML 4.01 Frameset"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
  200.         "http://www.w3.org/TR/html4/frameset.dtd">
  201. <html>
  202. <!--
  203.    HTML 4.01 FrameSet
  204.    Document type as defined on http://www.w3.org/TR/html401/
  205. -->
  206. <head>
  207.     <title>Title here!</title>
  208.     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  209. </head>
  210.     <frameset>
  211.     
  212.     </frameset>
  213. </html></token>
  214.     <token name="CSS 1.0 File">BODY {
  215.     font-size: 20px;
  216.     font-family: Arial, Helvetica, serif;
  217. }
  218. </token>
  219.     <token name="CSS 1.0 Embedded"><style type="text/css">
  220.     BODY { font-size: 12pt; color: gray; }
  221.     H1 { font-size: 24pt; font-weight: bold; color: gray; }
  222. </style></token>
  223.   </section>
  224. </snippets>
  225.